{% extends "learning_logs/base.html" %}

{% block content %}

<p>Topics</p>

<ul>
    <!--topics 是从context中传递过来-->
    {% for topic in topics %}
    <li>
        <a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a>
    </li>
    {% empty %}
    <li>No topics have been added yet.</li>
    {% endfor %}
    <a href="{% url 'learning_logs:new_topic' %}">Add a new topic:</a>
</ul>

{% endblock content %}
